package com.translate.web.constant;
public enum NotificationType {  
    ORDER_NOTIFICATION("订单通知", 0),  
    SECONDARY_SERVICE_NOTIFICATION("二次服务通知", 1),  
    INVOICING_NOTIFICATION("开票通知", 2),  
    TEAM_NOTIFICATION("团队通知", 3),  
    PREPAID_NOTIFICATION("预存通知", 4),  
    WITHDRAWAL_NOTIFICATION("提现通知", 5);  
  
    private final String description;  
    private final int value;  
  
    NotificationType(String description, int value) {  
        this.description = description;  
        this.value = value;  
    }  
  
    public String getDescription() {  
        return description;  
    }  
  
    public int getValue() {  
        return value;  
    }  
  
    public static NotificationType fromValue(int value) {  
        for (NotificationType type : NotificationType.values()) {  
            if (type.getValue() == value) {  
                return type;  
            }  
        }  
        throw new IllegalArgumentException("No enum constant with value " + value);  
    }  
  
    @Override  
    public String toString() {  
        return this.description;  
    }  
}